%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/mutation-update-undefined.variables"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 17, 25, 18<br /><br />1: PgUpdateSingle[14]<br />2: <br />ᐳ: Object[19]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 19, 14<br /><br />ROOT Object{1}ᐸ{result}ᐳ[19]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 14<br /><br />ROOT PgUpdateSingle{1}ᐸsimilar_table_1(id;)ᐳ[14]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3

    %% plan dependencies
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ3ᐳ[25]"}}:::plan
    __InputObject9{{"__InputObject[9∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject9 --> __InputObject6
    Access10{{"Access[10∈0] ➊<br />ᐸ0.nnValueᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ0.nullValueᐳ"}}:::plan
    Access10 & Access12 --> __InputObject9
    Object17{{"Object[17∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access15{{"Access[15∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access16{{"Access[16∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access15 & Access16 --> Object17
    __Value0["__Value[0∈0] ➊<br />ᐸvariableValuesᐳ"]:::plan
    __Value0 --> Access10
    __Value0 --> Access12
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access15
    __Value2 --> Access16
    ApplyInput18{{"ApplyInput[18∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput18
    PgUpdateSingle14[["PgUpdateSingle[14∈1] ➊<br />ᐸsimilar_table_1(id;)ᐳ<br />More deps:<br />- Constantᐸ3ᐳ[25]"]]:::sideeffectplan
    Object17 & ApplyInput18 --> PgUpdateSingle14
    Object19{{"Object[19∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgUpdateSingle14 --> Object19
    PgClassExpression20{{"PgClassExpression[20∈3] ➊<br />ᐸ__similar_...e_1__.”id”ᐳ"}}:::plan
    Access21{{"Access[21∈3] ➊<br />ᐸ14.tᐳ"}}:::plan
    Access21 --> PgClassExpression20
    PgUpdateSingle14 --> Access21
    PgClassExpression22{{"PgClassExpression[22∈3] ➊<br />ᐸ__similar_...1__.”col1”ᐳ"}}:::plan
    PgClassExpression20 o--o PgClassExpression22
    PgClassExpression23{{"PgClassExpression[23∈3] ➊<br />ᐸ__similar_...1__.”col2”ᐳ"}}:::plan
    PgClassExpression22 o--o PgClassExpression23
    PgClassExpression24{{"PgClassExpression[24∈3] ➊<br />ᐸ__similar_...1__.”col3”ᐳ"}}:::plan
    PgClassExpression23 o--o PgClassExpression24

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value0,__Value2,__InputObject6,__InputObject9,Access10,Access12,Access15,Access16,Object17,ApplyInput18 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgUpdateSingle14,Object19 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression20,Access21,PgClassExpression22,PgClassExpression23,PgClassExpression24 bucket3

